AppleScript

(Not available in VoodooPad Lite)

VoodooPad supports some cool AppleScript commands that might be useful to you. Besides the usual document based commands that go along with standard Macintosh applications, VoodooPad can also be told to export documents as HTML, RTFD, or plain text.

VoodooPad comes with a script menu, where you can put frequently used scripts. We've put an example of how to export your current document as HTML in there, so check it out along with VoodooPad's Applescript dictionary for reference.

You can also script VoodooPad plugins. Here is an example of exporting the current document as HTML, and telling it to use ".php" as the file extension, rather then the default ".html":

set exportFolder to "/tmp" -- change this to the path where you want the files exported

tell application "VoodooPad"
    set p to {fileExtension:"php", filePath:exportFolder}
    tell window 1 to use plugin named "Export as HTML..." with properties p
end tell

Here are a couple more good examples:

-- tell VP to export to the iPod
tell application "VoodooPad"
    tell document 1
        export to ipod
    end tell
end tell

-- open up the index page
tell application "VoodooPad"
    tell document 1 to open page with title "index"
end tell

-- create a page named "Flying Meat"
tell application "VoodooPad"
    tell document 1
        create page with title "Flying Meat" with contents 
              "Vist Flying Meat's website at http://www.flyingmeat.com/ today!"
    end tell
end tell

-- delete a page named "Flying Meat"
tell application "VoodooPad"
    tell document 1
        delete page with title "Flying Meat"
    end tell
end tell
-- a useless example that loops through all the pages and displays it's name and contents
tell application "VoodooPad"
    tell document 1
        repeat with i from 1 to number of items in pages
            set s to text of page i
            set n to name of page i
            display dialog n & return & s
        end repeat
    end tell
end tell